<ui:composition template="/WEB-INF/templates/login-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="menu"></ui:define>
	<ui:define name="submenu"></ui:define>
	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">		
	
	<h:form > 
		  <p:growl></p:growl>
		  <p:panel header="Offer Letter for -  #{viewOfferLetterBean.mrOrMs} #{viewOfferLetterBean.recruitmentProfile.candidateName}"> 
    	  <h:panelGrid cellspacing="10" 
					style="border: 1px solid #d9d9d9; width: 100%;font-size:14px; font-style:normal; font-family:Arial, Helvetica, sans-serif;">
					
					
					<img src="../resources/styles/images/logo.png" width="160px" height="130px"/>
					
					<h:panelGrid style="border: 0px solid #d9d9d9; width: 100%;font-size:14px;text-align: right" >
							<h:outputLabel  value="#{viewOfferLetterBean.rrfOfferLetterHRInputs.genearatedOfferLetterDate}" >
											<f:convertDateTime pattern="dd-MMM-yyyy" />
							</h:outputLabel>
					</h:panelGrid>
					<p align="right">Ref : HR/Offer/#{viewOfferLetterBean.rrfOfferLetterHRInputs.hrReferenceNo}</p><br/>
					
			        <p>Dear #{viewOfferLetterBean.mrOrMs} #{viewOfferLetterBean.recruitmentProfile.candidateName}</p><br/>
					
					<p>Greetings!!!</p><br/>
					
					<p>Further to the personal interview and subsequent discussions you had with our Management,we are pleased to offer you the position of <b>"#{viewOfferLetterBean.recruitmentProfile.band.businessFunction}"</b>  in grade <b>"#{viewOfferLetterBean.band}"</b> in our Business Unit SAP at Hyderabad , on the terms and conditions discussed with you during the interview.</p> <br/>
					
					<p>Your Gross salary (CTC) would be  Rs. #{viewOfferLetterBean.employeeGrossSalary}/- (#{viewOfferLetterBean.rrfOfferLetterHRInputs.grossSalaryInWords}) per annum. Letter of appointment along with a detailed salary break-up will be issued to you on your joining.</p><br/>
					
					
					<p>This offer is valid up to #{viewOfferLetterBean.joiningDate} and subject to your Medical Fitness. As discussed, your tentative date of joining will be considered by 
									             #{viewOfferLetterBean.joiningDate} . 
					</p><br/>
					
					<p>Kindly ensure that you carry the following documents on your date of joining:</p><br/>
					
					<p>1. Copy of original certificates (Includes education and previous employment) <br />
					   2. Date of birth proof<br />
					   3. 3 - Passport size photos and 2 Stamp size photos (with red background)<br />
					   4. 2 - PAN card copy<br />
					   5. Copy of relieving letter from the earlier organization<br />
					   6. Residential address proof<br />
					   7. Passport Photo Copy<br />
					   8. Scanned copies of all the above.</p><br/>
					
					<p>Please revert to us per return mail as a token of your acceptance and intimate us of your earliest date of joining.</p><br/>
					
					<p>Yours faithfully,<br />ERPandERP India Pvt Ltd.</p><br/><br/>
					<p>#{viewOfferLetterBean.rrfOfferLetterHRInputs.approverSignatureName}<br />(#{viewOfferLetterBean.rrfOfferLetterHRInputs.approverSignaturePosition})</p>
					
            	
            
	    </h:panelGrid>
	     <h:panelGrid columns="4" rendered="#{viewOfferLetterBean.activity eq 'OfferLetterApprovedByManager'}" >
					<h:outputLabel value="*" style="color : red;"/>
					<h:outputLabel value="Final Recommendation " style="font-weight:bold;" />
		            <h:outputLabel value=":" style="font-weight:bold;"/>
		            <p:selectOneMenu value="#{viewOfferLetterBean.rrfOfferLetterHRInputs.offerLetterStatus}" style="width:160px;">
		           		<f:selectItem itemLabel="--Choose One--" itemValue="" />
						<f:selectItem itemLabel="Approved" itemValue="Approved" />
						<f:selectItem itemLabel="Rejected" itemValue="Rejected" />
						<f:selectItem itemLabel="On Hold" itemValue="On Hold" />							
				    </p:selectOneMenu> 
				    
				    <h:outputLabel value="*" style="color : red;"/>
				    <h:outputLabel value="Remarks " style="font-weight:bold;" />
			        <h:outputLabel value=":"  style="font-weight:bold;"/>
			        <p:inputTextarea value="#{viewOfferLetterBean.rrfOfferLetterHRInputs.managerRecommendations}"   style="width:500px;"/>
     
			
	     </h:panelGrid>
	     <h:panelGrid>
	    	 <h:panelGroup style="float:right;">
	     			<p:commandButton value="Release For Approval"  actionListener="#{viewOfferLetterBean.goesToAprrovalAction}" update="@form" rendered="#{scheduleInterviewsBean.activity eq 'OfferLetterGoesToApproval'}"/>
					<p:commandButton value="Submit"  actionListener="#{viewOfferLetterBean.approvedByManagerAction}" update="@form" rendered="#{scheduleInterviewsBean.activity eq 'OfferLetterApprovedByManager'}"/>
					<p:commandButton value="Release to Candidate" update="@form"  actionListener="#{viewOfferLetterBean.releaseOfferLetterToCandidateAction}"  rendered="#{scheduleInterviewsBean.activity eq 'releaseOfferLetterToCandidate'}"/>
				    <p:commandButton value="Close" onclick="window.close();" />
				    <p:commandButton value="Back" onclick="window.close();" />  
	     	</h:panelGroup>
	     </h:panelGrid>
	    
	     	
					
	     
	     </p:panel>
     </h:form>
	</ui:define>
	
</ui:composition>
